package com.acquisition.task.service;

import com.dcs.cn.data.domain.RealTimeMonitorFactor;
import com.dcs.cn.param.domain.SerialPortParam;
import com.dcs.cn.param.domain.SingleMonitorFactorParam;

/**
 * 串口
 * 业务逻辑层
 *
 * @author wuqiwei
 * @date 2021/2/22
 */
public interface SerialPortService {

    /**
     * 读取串口数据，hj212-2017协议，返回监测因子RealTimeMonitorFactor
     *
     * @param monitorFactorParam 监测因子参数
     * @param serialPortParam 串口参数
     * @param dataTime 数据时间
     * @return RealTimeMonitorFactor
     */
    RealTimeMonitorFactor readSerialPortForHj2017(SingleMonitorFactorParam monitorFactorParam, SerialPortParam serialPortParam, Long dataTime);

    /**
     * 读取串口数据，hj212-2005协议，返回监测因子RealTimeMonitorFactor
     *
     * @param monitorFactorParam 监测因子参数
     * @param serialPortParam 串口参数
     * @param dataTime 数据时间
     * @return RealTimeMonitorFactor
     */
    RealTimeMonitorFactor readSerialPortForHj2005(SingleMonitorFactorParam monitorFactorParam, SerialPortParam serialPortParam, Long dataTime);

    /**
     * 读取串口数据，河北省协议，返回监测因子RealTimeMonitorFactor
     *
     * @param monitorFactorParam 监测因子参数
     * @param serialPortParam 串口参数
     * @return RealTimeMonitorFactor
     */
    RealTimeMonitorFactor readSerialPortForHebei(SingleMonitorFactorParam monitorFactorParam, SerialPortParam serialPortParam);

    /**
     * 读取串口数据，modbus协议，返回监测因子RealTimeMonitorFactor
     *
     * @param monitorFactorParam 监测因子参数
     * @param serialPortParam 串口参数
     * @return RealTimeMonitorFactor
     */
    RealTimeMonitorFactor readSerialPortForModbusRtu(SingleMonitorFactorParam monitorFactorParam, SerialPortParam serialPortParam);

    /**
     * 读取串口数据，读取w00000监测因子，返回监测因子RealTimeMonitorFactor
     *
     * @param monitorFactorParam 监测因子参数
     * @param serialPortParam 串口参数
     * @return RealTimeMonitorFactor
     */
    RealTimeMonitorFactor readSerialPortForW00000(SingleMonitorFactorParam monitorFactorParam, SerialPortParam serialPortParam);

}
